package com.quad.innovators.salesease.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum MenuTypeEnum implements IBaseEnum<Integer>{

    NULL(0, null),
    MENU(1, "菜单"),
    CATALOG(2, "目录"),
    EXTERN_LINK(3, "外链"),
    BUTTON(4, "按钮"),
    IFRAME(5, "嵌入"),
    DATA_PERMISSION(6, "数据权限");

    //  Mybatis-Plus 提供注解表示插入数据库时插入该值
    @EnumValue
    @JsonValue
    private final Integer value;

    //@JsonValue //  表示对枚举序列化时返回此字段
    private final String label;

    MenuTypeEnum(Integer value, String label) {
        this.value = value;
        this.label = label;
    }

}
